---
title: useUIState
description: Reference for the useUIState function from the AI SDK RSC
---

# `useUIState`

It is a hook that enables you to read and update the UI State. The state is client-side and can contain functions, React nodes, and other data. UIState is the visual representation of the AI state.

## Import

<Snippet text={`import { useUIState } from "ai/rsc"`} prompt={false} />

<ReferenceTable packageName="rsc" functionName="useUIState" />

## Examples

<ExamplesList packageName="rsc" functionName="useUIState" />
